package com.itheima.date8;

import java.time.LocalDate;
import java.time.Period;

public class Demo06 {

    public static void main(String[] args) {
        LocalDate start = LocalDate.of(1921, 7, 1);
        LocalDate now = LocalDate.now();
        Period period = Period.between(start, now);

        System.out.println(period);
        System.out.println(period.getYears());
        System.out.println(period.getMonths());
        System.out.println(period.getDays());

        System.out.println(period.toTotalMonths());
    }
}
